'use strict';

define(['angular'], function(angular) {

    // 构造服务模块
    function ServiceModule(name, dependencies) {
        var module = angular.module(name, dependencies);
        module.config(['$provide', function($provide) {
            module.register = function(name, constructor) {
                return $provide.factory(name, constructor);
            }
        }]);
        return module;
    }
    return {
        common : new ServiceModule('app.common.services', []),
        home : new ServiceModule('app.home.services', []),
        solr : new ServiceModule('app.solr.services', []),
        collection : new ServiceModule('app.collection.services', []),
        client : new ServiceModule('app.client.services', []),
        stat : new ServiceModule('app.stat.services', []),
        log : new ServiceModule('app.log.services', []),
        system : new ServiceModule('app.system.services', [])
    };
});